﻿<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<link rel="stylesheet" type="text/css" href="./themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="./themes/icon.css">
	<link rel="stylesheet" type="text/css" href="./demo.css">
	<script type="text/javascript" src="./jquery.min.js"></script>
	<script type="text/javascript" src="./jquery.easyui.min.js"></script>
	<script type="text/javascript" src="./locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="./extend.js"></script>
	<script type="text/javascript" src="./jquery.cookie.js"></script>
    <script>
        var dataListCache = null;
        var dataCache = null;
        var appId = GetQueryString("moduleid");
        var uid = GetQueryString("uid");
        window.onresize=calSize;
        $(document).ready(function(){
            setData();
            calSize();
		});
        function setData(){
        }
        window.onresize=calSize;
        function calSize(){
            var height=window.parent.document.getElementById("mainFrame").clientHeight;
            var width=window.parent.document.getElementById("mainFrame").clientWidth;
            window.parent.document.getElementById(appId).height = height-32;
            $("#toolbar").panel({width:width-15});
            $("#editToolbar").panel({width:width-15});
            $("#editZone").panel('resize',{height:height-76,width:width-15});
        }

        function submitChange(){
            showMask();
            var pwd = $("#Pwd").textbox("getValue");
            $.get("../api/user/ChgPwd?password=" + pwd + "&uid=" + uid, function (response) {
                if(response.Result==0){
                    dataCache = JSON.parse(response.Data);
                    $.messager.alert("信息","操作成功","info");
                }else{
                    $.messager.alert("错误",response.Message,"error");
                }
            })
            .error(function(){
                $.messager.alert("错误","系统内部错误","error");
            })
            .complete(function() { 
                hideMask();
            });
        }

    </script>
<head>
<body onload = "hideMask()">
    <script>showMask('正在载入数据');</script>
    <div style="margin:2px"></div>
        <div class="easyui-panel" id="editToolbar" style="padding:1px;width:100%">
            <a href="#" class="easyui-linkbutton" data-options="onClick:submitChange,iconCls:'icon-save',plain:true">保存</a>
        </div>
        <div style="margin:2px"></div>
        <div id="editZone" class="easyui-panel" style="padding:4px 4px 0px 4px" >
            <table>
                <tr>
                    <td><input class="easyui-textbox" id="Pwd"  style="width:300px" data-options="label:' 新密码:',required:true"></td>
				</tr>
            </table>
        </div>
</body>
</html>